package com.example.day05;
import java.util.Scanner; //1.导入扫描仪
public class ScannerDemo {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);//2.新建一个扫描仪叫scan
        System.out.println("请输入年龄：5");
        int age = scan.nextInt();//3.扫描一个整数并赋值给age
        System.out.println("年龄为："+age);
    }
}
